package exercise.day06;

public class ExtendedExercise {
    public static void main(String[] args) {
        int[] arr=new int[10];
        getMaxOfArray(arr,10,99);

    }
    public static int getMaxOfArray(int[] arr,int len,int a){
         arr=new int[len];
         int max=0;
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*(a+1));
            System.out.print(arr[i]+" ");
            if(max<arr[i]){
                max=arr[i];
            }
        }
        System.out.println();
        System.out.println("最大值："+max);
        return max;
    }

}
